package org.yiqixue.accounts.entity;

import jakarta.persistence.*;
import lombok.*;
import java.time.LocalDateTime;  // 使用新的日期时间API

// Accounts.java
@Entity
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class Accounts extends BaseEntity {  // 继承后已包含时间字段

    @Column(name="customer_id")
    private Long customerId;

    @Id
    @Column(name="account_number")
    private Long accountNumber;

    @Column(name="account_type", nullable = false)  // 添加非空约束
    private String accountType;

    @Column(name = "branch_address", nullable = false)
    private String branchAddress;

    @Column(name = "phone_number", unique = true, nullable = false)
    private String phoneNumber;

    // 注意：已删除重复的createdAt/updateAt字段
}